/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tests;

import br.ufc.great.ad.Model.DB;
import br.ufc.great.ad.Model.Evaluation;
import org.hibernate.Session;
import org.hibernate.Transaction;

/**
 *
 * @author great
 */
public class testPersistence {

    DB db = new DB();
    Session session = db.getSession();

    public static void main(String args[]){
        testPersistence testClass = new testPersistence();
        
        testClass.testSystem();
    }
    
    public void testEvaluation() {
        
        Evaluation evaluation = new Evaluation();

        
        Transaction tx = (Transaction) session.beginTransaction();
        session.save(evaluation);
        tx.commit();
        
    }

    public void testFactors() {
    }

    public void testLevel() {
    }

    public void testMetric() {
    }

    public void testParameters() {
    }

    public void testSystem() {
        br.ufc.great.ad.Model.System system = new br.ufc.great.ad.Model.System();

        system.setDescription("Descrição test");
        system.setName("name test");
        
        Transaction tx = (Transaction) session.beginTransaction();
        session.save(system);
        tx.commit();
    }
}
